<template>
	<page-loading :show="showimg">
	<!--我的寻车-->
	<view class="content">
		<view class="choose-group">
			<view class="list-total">
				<view :class="item.checked == true ? 'li active' : 'li'" v-for="(item, index) in dataList" :key="index" @tap="ChooseSelector(index)">
					<view class="name">{{ item.name }}</view>
				</view>
			</view>
		</view>

		<!-- 列表 -->
		<view class="looking-car" v-if="showimg">
			<view class="li" :class="item.state === 2 || item.state === 3 ? 'color-999' : ''" v-for="(item, index) in myFindCarlist" :key="index">
				<view class="flex border-bottom-1" @tap="searlclick(item)">
					<view class="u-text-center">
						<i-icon icon="iconxun" class="mr-10 mt-5" type="single" size="36rpx" :color="item.state === 2 || item.state === 3 ? '#999' : '#FCD31F'"></i-icon>
					</view>
					<view class="width-93 ">
						<view class="flex">
							<view class="width-80 color-333" :class="item.state === 2 || item.state === 3 ? 'color-999' : ''">{{ item.car_type_name }} {{ item.car_name }}</view>
							<view class="width-20 u-text-right color-EB5B01">{{ offerCountList[item.state] }}</view>
						</view>
						<view class="line">
							<text class="name">指导价:</text>
							<text class="con">{{ item.price }}</text>
						</view>
						<view class="line">
							<text class="name">类型：</text>
							<text class="con">{{ fliterSpecification(item.specification) }} {{ item.facade_picture[0].outerColour.color }}/{{ item.facade_picture[0].inColour.color }}</text>
						</view>
						<view class="line">
							<text class="name">卖：</text>
							<text class="con">{{ item.region_limit_name }}</text>
						</view>
						<view class="line">
							<text class="name">有效期至：</text>
							<text class="width-30 ">{{ backTime(item.deadline) }}</text>
							<view class="width-50 u-text-right color-999 font-24">
								剩余询价时间：
								<u-count-down
									:timestamp="item.betweenTime"
									color="#999"
									separator-color="#999"
									:show-minutes="false"
									:show-seconds="false"
									separator="zh"
									separator-size="24"
									font-size="24"
								></u-count-down>
							</view>
						</view>
						<view class="line">
							<text class="name">询价人：</text>
							<view class="con flex">
								<text class="ma">{{ gethideshow(item.trueName) }}</text>
								<view class="ml-10">
									<i-icon icon="iconshenfenrenzheng" type="single" size="44rpx" :color="item.state === 2 || item.state === 3 ? '#999' : '#60C634'"></i-icon>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view class="flex mt-20">
					<view class="width-50 person-price">
						<view class="line">
							<text :class="item.state === 2 || item.state === 3 ? 'color-999' : 'color-EB5C02'">{{ item.views }}次</text>
							浏览/
							<text :class="item.state === 2 || item.state === 3 ? 'color-999' : 'color-EB5C02'">{{ item.offerAmount }}人</text>
							报价
						</view>
					</view>

					<view class="width-50 flex flex-jc-fe">
						<!-- <view class="u-text-right"> -->
						<button class="btn-bg-yellow bgfff" v-if="item.state === 1" @click="Inquiryonshelves(item, 0)">取消寻车</button>
						<button class="btn-bg-yellow" v-if="item.state === 2 || item.state === 3" @click="Inquiryonshelves(item, 1)">上架</button>
						<button class="btn-bg-yellow bgfff" v-if="item.state === 0" @click="Inquiryedit(item.id)">编辑</button>
						<!-- </view> -->
						<!-- #ifdef APP-PLUS -->
						<view class="tips u-text-right" v-if="item.state === 0" @click="share(item.id)"><i-icon icon="iconfenxiang1" class="middle" type="multiple" size="34rpx"></i-icon></view>
						<!-- #endif -->
					</view>
				</view>
			</view>
			<u-loadmore :status="loadText[loadTextIndex]" icon-type="flower" />
		</view>
		<!-- 默认图片 -->

		<defaultImg v-else :show='true'></defaultImg>
		<template v-if="show">
			<u-popup v-model="show" mode="center" border-radius="14" width="540rpx" height="365rpx">
				<view class="popup-title">取消寻车</view>
				<view class="popup-content">是否确定取消此条寻车信息？</view>
				<view class="btnWrap flex">
					<view class="width-50 left" @click="show = false"><view class="inline-block">我再想想</view></view>

					<view class="width-50 right" @click="$u.throttle(setFindTheCarStatus, 1000)">确认取消</view>
				</view>
			</u-popup>
		</template>

		<ctime title="上架日期" :showsc="findthecarStatus" @confirmTime="confirmFindTheCarStatus" @closeTime="findthecarStatus = false"></ctime>
		<view class="fixedBottomBtn" @click="chakanwxc">
			<view class=""><button class="width-90 btn-bg-yellow line88">发布寻车</button></view>
		</view>
	</view>
	</page-loading>
</template>

<script src="./iFoundTheCar.js"></script>
<style lang="scss" scoped>
@import './iFoundTheCar.scss';
@import '../style/common.scss';
</style>
